package cn.xerllent.wxtp.service.impl;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import cn.xerllent.common.service.impl.BaseServiceImpl;
import cn.xerllent.wxtp.entity.WxDepartmentUser;
import cn.xerllent.wxtp.service.WxDepartmentUserService;
import cn.xerllent.wxtp.service.mapper.WxDepartmentUserMapper;

@Service
//@AllArgsConstructor
//@CacheConfig(cacheNames = "user")
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public class WxDepartmentUserServiceImpl extends BaseServiceImpl<WxDepartmentUserMapper, WxDepartmentUser>  implements WxDepartmentUserService {

	/**
	 * 清除对应Mapper的二级缓存，采用无害删除空数据模拟清空,因为二级缓存更新机制是本表数据更新即可清空<br>
	 * 提供本方法供联表更新查询的实时更新
	 * */
	@Override
	public void clearCache() {
		baseMapper.deleteById(0);
	}

}
